import request from '@/utils/request'
const path = 'http://39.108.248.115:9000'
// 权限
const api = {
    tree: path + '/base/permissions'
}

// 权限树
export function getTree () {
    return request({
        url: api.tree + '/1/tree',
        method: 'get'
    })
}
// 删除权限节点
export function deleteTree (id) {
    return request({
        url: api.tree + '/' + id,
        method: 'delete'
    })
}
// 添加权限节点
export function addTree (parameter) {
    return request({
        url: api.tree,
        method: 'post',
        data: parameter
    })
}
// 获取权限节点详细信息
export function detailTree (id) {
    return request({
        url: api.tree + '/' + id,
        method: 'get'
    })
}
// 更新权限节点信息
export function editTree (parameter) {
    return request({
        url: api.tree + '/' + parameter.permissionId,
        method: 'put',
        data: parameter
    })
}
